﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="产品出库单录入.aspx.cs" Inherits="syc.Store.产品出库单录入" %>
<html>
<title></title>
<style>
a.listitem{display:block;border-top:1px solid #ffffff;border-bottom:1px solid #dddddd;padding:3px;background-color:#eeeeee;}
a.listitem:link {color: #111111;text-decoration: none; }
a.listitem:visited {color: #111111;text-decoration: none; }
a.listitem:hover {color: #ff6633;text-decoration: none; background-color:#d2e8ae; }
a.listitem:active {color: #ff6633;text-decoration: none; }
#CheHaoMenu{display:none;position:absolute;border-width:3px; border-style:outset; width:150px; height:200px; overflow-y:scroll;background-color:#ffffff;}
</style>
<body>
<script type="text/javascript" language="javascript" src="/common.js"></script>
<form id="form1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>"></asp:SqlDataSource>

<asp:HiddenField ID="GHList" runat="server" Value="" />
<asp:HiddenField ID="LHList" runat="server" Value="" />
<asp:HiddenField ID="KHList" runat="server" Value="" />
<asp:HiddenField ID="ZLList" runat="server" Value="" />
<asp:HiddenField ID="CDList" runat="server" Value="" />
<asp:HiddenField ID="BeiZhu" runat="server" Value="" />
<asp:HiddenField ID="CheHao" runat="server" Value="" />

<asp:Label ID="BillID" runat="server" Text="0" Visible="False"></asp:Label>
<asp:Label ID="HeTongID" runat="server" Text="0" Visible="False"></asp:Label>
<asp:Label ID="ChanPinID" runat="server" Text="0" Visible="False"></asp:Label>
<asp:Label ID="DHID" runat="server" Text="0" Visible="False"></asp:Label>
<asp:Label ID="ReadOnly" runat="server" Text="false" Visible="False"></asp:Label>
<asp:Label ID="ZZL" runat="server" Text="0" Visible="False"></asp:Label>


<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
    SelectCommand="SELECT Value FROM 系统变量 where Name='运输车号' order by value" >
    <InsertParameters>
        <asp:Parameter Name="BillID" Direction="Output" Size="4" DbType="Int32"/>
    </InsertParameters>
</asp:SqlDataSource>
<asp:Panel ID="CheHaoMenu" runat="server">
    <asp:Repeater ID="CheHaoTemp" runat="server" DataSourceID="SqlDataSource2">
    <ItemTemplate>
    <a class=listitem href="javascript:" onclick='setCheHao(this.innerHTML);'><%# Eval("Value")%></a>
    </ItemTemplate>
    </asp:Repeater>
</asp:Panel>
<div id="wintop" class="wintop">产品出库单录入</div>
<asp:Panel ID="Panel1" runat="server" CssClass="panel2" HorizontalAlign="Center">
生产单位：<asp:DropDownList ID="ShengChan" runat="server" Width="105px" TabIndex="1">
<asp:ListItem Value="101">一分厂</asp:ListItem>
<asp:ListItem Value="201">二分厂1号线</asp:ListItem>
<asp:ListItem Value="202">二分厂2号线</asp:ListItem>
<asp:ListItem Value="501">五分厂1号线</asp:ListItem>
<asp:ListItem Value="502">五分厂2号线</asp:ListItem>
</asp:DropDownList>

出库日期：<asp:TextBox ID="Date1" runat="server" CssClass="textbox" Width="105px" TabIndex="1"></asp:TextBox><img id="DateIcon" alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
<span style="margin-left:5px;"></span>
序号：<asp:TextBox ID="XuHao" runat="server" CssClass="textbox" Width="60" TabIndex="1"></asp:TextBox>
<span style="margin-left:5px;"></span>

<asp:Button ID="Button_Verify" runat="server" Text="数据校验" CssClass="mbutton" 
        UseSubmitBehavior="False" TabIndex="5" OnClientClick="OnSave();" 
        onclick="Button_Verify_Click"/>
<asp:Button ID="Button_Save" runat="server" Text="保 存" CssClass="mbutton"
        UseSubmitBehavior="False" TabIndex="5" onclick="Button_Save_Click" OnClientClick="OnSave();"/>
<asp:Button ID="Button_Deliver" runat="server" Text="送 检" CssClass="mbutton" Visible="false"
    UseSubmitBehavior="False" onclick="Button_Deliver_Click"  TabIndex="5"/>
<asp:Button ID="Button_Pass" runat="server" Text="盖 章" CssClass="mbutton" Visible="false"
        UseSubmitBehavior="False" onclick="Button_Pass_Click" TabIndex="5"/>
<input type="button" value="导出Excel" class="mbutton" onclick="Export();" TabIndex="5"/>
<input type="button" value="库存查询" class="mbutton" onclick="parent.swin2_load('/Store/产品库存统计.aspx',820,600,'yes');" TabIndex="5"/>
<input type="button" value="关 闭" class="mbutton" onclick="parent.swin_close();"  TabIndex="5"/></asp:Panel>
<div style="text-align:center;">
<script>putBillHead();</script>
<style>
tr{height:18pt}
td.wb,td.zl,td.cd{border:0.5pt solid #000000;font-size:11pt;}
td.nb{border:none;font-size:11pt;}
div.ed{font-size:11pt;width:100%;height:100%;line-height:16pt;background-color:#d2e8ae;}
#PDZ{margin-top:-100px;}
</style>
<table id=mt border=0 style='border-collapse: collapse;text-align:center' cellpadding=1 bordercolor=#000000>
<tr>
<td class=nb colspan=10 style=font-size:16pt;><b>陕西延长石油材料有限公司</b></td>
</tr>
<tr>
<td class=nb colspan=2>　</td>
<td class=nb colspan=6 style=font-size:16pt;><b>产品出库清单</b></td>
<td class=nb colspan=2>编号：SYC/ZJ-WL-20</td>
</tr>
<tr style=height:14pt;>
<td class=nb colspan=8>　</td>
<td class=nb colspan=2><%=this.Date1.Text %></td>
</tr>
<tr>
<td class=wb>订货单位</td>
<td class=wb colspan=2 style=font-size:13pt;font-weight:bold;><asp:Label ID="DingHuo" runat="server" Text=""></asp:Label></td>
<td class=wb>技术条件</td>
<td class=wb style=font-size:10pt;>API Spec5CT</td>
<td class=wb>合同号</td>
<td class=wb colspan=2><asp:Label ID="HeTongHao" runat="server" Text=""></asp:Label></td>
<td class=wb>序号</td>
<td class=wb style=font-size:13pt;font-weight:bold;><%=this.XuHao.Text %></td>
</tr>
<tr>
<td class=wb>产品类别</td>
<td class=wb style=font-size:13pt;font-weight:bold;><asp:Label ID="ChanPin" runat="server" Text=""></asp:Label></td>
<td class=wb>钢级</td>
<td class=wb><asp:Label ID="GangJi" runat="server" Text=""></asp:Label></td>
<td class=wb>规格(mm)</td>
<td class=wb><asp:Label ID="GuiGe" runat="server" Text=""></asp:Label></td>
<td class=wb>总支数</td>
<td class=wb style=font-size:14pt;font-weight:bold;><asp:Label ID="ZZS" runat="server" Text=""></asp:Label></td>
<td class=wb>生产单位</td>
<td class=wb><%=this.ShengChan.SelectedItem.Text %></td>
</tr>
<tr>
<td class=wb>总重量(吨)</td>
<td class=wb colspan=2 style=font-size:14pt;font-weight:bold;><%=decimal.Parse(this.ZZL.Text)/1000 %></td>
<td class=wb>总件数</td>
<td class=wb style=font-size:14pt;font-weight:bold;><asp:Label ID="ZJS" runat="server" Text=""></asp:Label></td>
<td class=wb>总长度m</td>
<td class=wb colspan=2 style=font-size:14pt;font-weight:bold;><asp:Label ID="ZCD" runat="server" Text=""></asp:Label></td>
<td class=wb>发货方式</td>
<td class=wb><asp:Label ID="FaHuoFangShi" runat="server" Text=""></asp:Label></td>
</tr>
<tr>
<td class=wb style=width:105px;>原料供货商</td>
<td class=wb style=width:95px;>炉号</td>
<td class=wb style=width:95px;>捆数编号</td>
<td class=wb style=width:95px;>捆重量(kg)</td>
<td class=wb style=width:95px;>捆长度(m)</td>
<td class=wb style=width:105px;>原料供货商</td>
<td class=wb style=width:95px;>炉号</td>
<td class=wb style=width:95px;>捆数编号</td>
<td class=wb style=width:95px;>捆重量(kg)</td>
<td class=wb style=width:95px;>捆长度(m)</td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>
<tr>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="2" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
<td class=wb></td>
<td class=wb></td>
<td class=wb><div class="ed" tabindex="3" contentEditable></div></td>
<td class=zl></td>
<td class=cd></td>
</tr>

<tr>
<td class=wb>备注</td>
<td class=wb colspan="6"><div class="ed" tabindex="4" contentEditable style="text-align:left;"></div></td>
<td class=wb>车号</td>
<td class=wb colspan="2"><div id="box_CheHao" class="ed" tabindex="4" contentEditable style="text-align:left;"></div></td>
</tr>
<tr>
<td class=nb>　</td>
<td class=nb style="text-align:left;" colspan="2">&nbsp;主管：马玮</td>
<td class=nb>　</td>
<td class=nb>　</td>
<td class=nb>　</td>
<td class=nb>　</td>
<td class=nb>　</td>
<td class=nb colspan="2" style="text-align:left;">&nbsp;库管员：<asp:Label ID="KuGuanYuan" runat="server" Text=""></asp:Label></td>
</tr>
</table>
<asp:Image ID="PDZ" runat="server" ImageUrl="/images/pdz.png" Visible="false" ImageAlign="Right" />
<script>putBillFoot();</script>
</div>
</form>

<form id="form2" method="post" action="/PageExport.ashx">
<input type="hidden" name="filename" value="产品出库清单.xls" />
<input type="hidden" name="content" value="" />
</form>
<script>
var readonly=<%=this.ReadOnly.Text %>;

var notice = "<%=this.Notice %>";
if (notice != "") {
    parent.showmsgbox(notice);
}
</script>
<script>

var mt = document.getElementById("mt");
document.getElementById("ShengChan").onchange = function() {
    mt.rows[4].cells[9].innerHTML = this.options[this.selectedIndex].text;
}
document.getElementById("Date1").onchange = function() {
    mt.rows[2].cells[1].innerHTML = this.value;
}
document.getElementById("XuHao").onchange = function() {
    if(this.value.search(/[^0-9]+/i)!=-1)
    {
        parent.showmsgbox("·“序号”录入有误，需录入一个正整数");
    }
    mt.rows[3].cells[7].innerHTML = this.value;
}
var GHList = document.getElementById("GHList");
var LHList = document.getElementById("LHList");
var KHList = document.getElementById("KHList");
var ZLList = document.getElementById("ZLList");
var CDList = document.getElementById("CDList");
var BeiZhu = document.getElementById("BeiZhu");
var CheHao = document.getElementById("CheHao");

var i;
var tmp1 = GHList.value.split("|");
var tmp2 = LHList.value.split("|");
var tmp3 = KHList.value.split("|");
var tmp4 = ZLList.value.split("|");
var tmp5 = CDList.value.split("|");

for (i = 1; i <=28; i++) {
    if(i<tmp3.length)
    {
        if (i < 15) {
            if (i == 0) {
                mt.rows[i + 6].cells[0].innerHTML = tmp1[i];
                mt.rows[i + 6].cells[1].innerHTML = tmp2[i];
            }
            else {
                if (tmp1[i] != tmp1[i - 1]) {
                    mt.rows[i + 6].cells[0].innerHTML = tmp1[i];
                }
                if (tmp2[i] != tmp2[i - 1]) {
                    mt.rows[i + 6].cells[1].innerHTML = tmp2[i];
                }
            }
            
            
            if(readonly)
            {
                mt.rows[i + 6].cells[2].innerHTML = tmp3[i];
            }
            else
            {
                mt.rows[i + 6].cells[2].firstChild.innerHTML = tmp3[i];
            }
            mt.rows[i + 6].cells[3].innerHTML = tmp4[i];
            mt.rows[i + 6].cells[4].innerHTML = tmp5[i];
        }
        else {
//            if (tmp1[i] != tmp1[i - 1]) {
//                mt.rows[i - 14 + 6].cells[5].innerHTML = tmp1[i];
//            }
//            if (tmp2[i] != tmp2[i - 1]) {
//                mt.rows[i - 14 + 6].cells[6].innerHTML = tmp2[i];
//            }

            if (i == 15) {
                mt.rows[i - 14 + 6].cells[5].innerHTML = tmp1[i];
                mt.rows[i - 14 + 6].cells[6].innerHTML = tmp2[i];
            }
            else {
                if (tmp1[i] != tmp1[i - 1]) {
                    mt.rows[i - 14 + 6].cells[5].innerHTML = tmp1[i];
                }
                if (tmp2[i] != tmp2[i - 1]) {
                    mt.rows[i - 14 + 6].cells[6].innerHTML = tmp2[i];
                }
            }
            
            if(readonly)
            {
                mt.rows[i - 14 + 6].cells[7].innerHTML = tmp3[i];
            }
            else
            {
                mt.rows[i - 14 + 6].cells[7].firstChild.innerHTML = tmp3[i];
            }
            mt.rows[i - 14 + 6].cells[8].innerHTML = tmp4[i];
            mt.rows[i - 14 + 6].cells[9].innerHTML = tmp5[i];
        }
    }
    else if(readonly)
    {
        if (i < 15) {
           mt.rows[i + 6].cells[2].innerHTML = "";
            
        }
        else {
            mt.rows[i - 14 + 6].cells[7].innerHTML = "";
        }
    }
}
if(readonly)
{
    document.getElementById("DateIcon").onclick=null;
    mt.rows[21].cells[1].innerHTML = BeiZhu.value;
    mt.rows[21].cells[3].innerHTML = CheHao.value;
}
else
{
    mt.rows[21].cells[1].firstChild.innerHTML = BeiZhu.value;
    mt.rows[21].cells[3].firstChild.innerHTML = CheHao.value;
}
mt.rows[5].cells[1].innerHTML = fixFloatZ(mt.rows[5].cells[1].innerText,3);

document.onkeydown = function(e) {
    if (!e) e = window.event;
    var tag = e.srcElement;
    if (!tag) tag = e.target;
    if (tag.tagName == "INPUT" && tag.className == "textbox" || tag.tagName == "SELECT" || tag.tagName == "DIV") {
        if (e.keyCode == 13)
        {
            e.keyCode = 9;
        }
    }
    else if (e.keyCode == 8)
    {
        return false;
    }
}
var divs=document.getElementsByTagName("DIV");
for(i=0;i<divs.length;i++)
{
    if(divs[i].contentEditable)
    {
        divs[i].onfocus=function(){
            oldvalue=this.innerText;
        }
    }
    if(divs[i].tabIndex==2 || divs[i].tabIndex==3)
    {
        divs[i].onblur=CheckInput;
    }
}
function GetLastPrefix(o)
{
    var kh;
    if(o.parentNode.rowIndex>7)
    {
        o=mt.rows[o.parentNode.rowIndex-1].cells[o.cellIndex];
    }
    else if(o.cellIndex==7)
    {
        o=mt.rows[20].cells[2];
    }
    else
    {
        return "";
    }
    if(o.innerText.match(/^[0-9]{4}-[0-9]{4}$/)==null)
    {
        return GetLastPrefix(o);
    }
    else
    {
        return o.innerText.split("-")[0];
    }
}
function CheckInput()//检测捆号
{
    var errmsg="·捆号录入有误";
    var t=this.innerText.replace(/(^ +)|( +$)/,"");
    t=t.replace(/[ \.\*\+\/]+/,"-");
    if(t.search(/[^0-9\-]+/)!=-1)
    {
        parent.showmsgbox(errmsg);
        this.innerHTML="";
        return;
    }
    if(t=="")return;
    t=t.split("-");
    if(t.length>2)
    {
        parent.showmsgbox(errmsg);
        return;
    }
    else if(t.length==1)
    {
        if(t[0].length>4)
        {
            t[1]=t[0].substr(4);
            t[0]=t[0].substr(0,4);
        }
        else
        {
            t[1]=t[0];
            t[0]=GetLastPrefix(this.parentNode);
        }
    }
    if(t[1].length=="" || Number(t[1])==0)
    {
        this.innerHTML="";
        return;
    }
    else if(t[1].length>4)
    {
        parent.showmsgbox(errmsg);
        return;
    }
    else if(t[1].length<4)
    {
        t[1]=("000"+t[1]).substr(t[1].length-1);
    }
    if(t[0]=="" || Number(t[0])==0)
    {
        parent.showmsgbox(errmsg+"，请录入捆号前缀");
        return;
    }
    else if(t[0].length<4)
    {
        t[0]=("000"+t[0]).substr(t[0].length-1);
    }
    this.innerHTML=t[0]+"-"+t[1];
    for(i=0;i<14;i++)
    {
        if( (mt.rows[i+7].cells[2].innerText==this.parentNode.innerText && mt.rows[i+7].cells[2]!=this.parentNode)
        || (mt.rows[i+7].cells[7].innerText==this.parentNode.innerText && mt.rows[i+7].cells[7]!=this.parentNode) )
         {
            parent.showmsgbox("·捆号重复录入");
            this.innerHTML="";
            return;
         }
    }
}

function OnSave() {
    if(readonly)
    {
        return true;
    }
    KHList.value="";
    var o;
    for(i=0;i<28;i++)
    {
        if(i<14)
        {
            o=mt.rows[i+7].cells[2];
        }
        else
        {
            o=mt.rows[i-14+7].cells[7];
        }
        if(o.innerText.match(/^[0-9]{4}-[0-9]{4}$/)!=null)
        {
            KHList.value+="|"+o.innerText;
        }
    }
    BeiZhu.value=mt.rows[21].cells[1].innerText;
    CheHao.value=mt.rows[21].cells[3].innerText;
    return true;
}

    //导出Excel
function Export() {
    form2.content.value =
"<html xmlns:o='urn:schemas-microsoft-com:office:office'\nxmlns:x='urn:schemas-microsoft-com:office:excel'\nxmlns='http://www.w3.org/TR/REC-html40'>\n<head>\n<meta http-equiv=Content-Type content='text/html; charset=utf-8'>\n<style>\n<!--table\n@page\n{mso-header-data:;\nmso-footer-data:;\nmargin:.79in .31in .79in .31in;\nmso-header-margin:.51in;\nmso-footer-margin:.51in;\nmso-page-orientation:landscape;\nmso-horizontal-page-align:center;\n}\ntr{height:20pt}\ntd{font-size:11pt;text-align:center;mso-number-format:'\@';}\ntd.wb{border:0.5pt solid #000000;}\ntd.zl{border:0.5pt solid #000000;mso-number-format:'0\.0_ '}\ntd.cd{border:0.5pt solid #000000;mso-number-format:'0\.00_ '}\ntd.nb{border:none;}\n-->\n</style>\n<!--[if gte mso 9]><xml>\n<x:ExcelWorkbook>\n<x:ExcelWorksheets>\n<x:ExcelWorksheet>\n<x:Name>产品出库清单</x:Name>\n<x:WorksheetOptions>\n<x:DefaultRowHeight>285</x:DefaultRowHeight>\n<x:Print>\n<x:ValidPrinterInfo/>\n<x:Scale>100</x:Scale>\n<x:PaperSizeIndex>9</x:PaperSizeIndex>\n<x:HorizontalResolution>200</x:HorizontalResolution>\n<x:VerticalResolution>200</x:VerticalResolution>\n</x:Print>\n<x:Selected/>\n<x:Panes>\n<x:Pane>\n<x:Number>3</x:Number>\n<x:ActiveRow>0</x:ActiveRow>\n<x:ActiveCol>0</x:ActiveCol>\n</x:Pane>\n</x:Panes>\n</x:WorksheetOptions>\n</x:ExcelWorksheet>\n</x:ExcelWorkbook>\n</xml><![endif]-->\n</head>\n<body>"
        + mt.outerHTML +"</body></html>";
    form2.submit();
}


var CheHaoMenu = document.getElementById("CheHaoMenu");
var box_CheHao = document.getElementById("box_CheHao");
box_CheHao.onfocus = function() {
    CheHaoMenu.style.left = (getObjectLeft(this)) + "px";
    CheHaoMenu.style.top = (getObjectTop(this) - 200) + "px";
    CheHaoMenu.style.display = "block";
};
function setCheHao(s) {
    box_CheHao.innerHTML = s;
    CheHaoMenu.focus();
    box_CheHao.focus();
}
var th;
box_CheHao.onblur = function() {
    th=setTimeout("CheHaoMenu.style.display = 'none';", 300);
};
CheHaoMenu.onfocus = function() {
    clearTimeout(th);
}
</script>
</body>
</html>
